#include <iostream>
#include <cmath>
#define N 100

using namespace std;

void read_matrix(int matrix[N][N], int row, int column){
int i, j;
for (i=0;i<row;i++)
    for(j=0;j<column;j++){
        cout<<"["<<i<<"]["<<j<<"]= ";
        cin>>matrix[i][j];}
}

void print_matrix(int matrix[N][N], int row, int column){
int i,j;
for (i=0;i<row;i++){
    for(j=0; j<column; j++)
			cout<<matrix[i][j]<<" ";
		cout<<endl;}
}

int main(){
int row;
int column;
int matrix[N][N];
int i,j;
bool is=true;

cout<<"Type the number of rows: " ;
cin>>row;

cout<<"Type the number of columns: " ;
cin>>column;

read_matrix(matrix, row, column);

for(i=0;i<row;++i)
    if(is==true)
        for (j=0; j<column; ++j){
            if(i!=j)
                if(matrix[i][j]!=matrix[j][i])
                    is=false;}
                else
                    break;
print_matrix(matrix, row,column);

if(is==true)
		cout<<"Matrix is symmetrical towards the main diagonal."<<endl;
	else
		cout<<"Matrix it is not symmetrical towards the main diagonal."<<endl;

return 0;
}
